-
animation
动画操作帮助类
import {Animation} from 'angular-es-utils';
import Animation from 'angular-es-utils/animation';
-
apply
替代$scope.$apply()
import apply from 'angular-es-utils/apply';
...
apply();
-
decorators
装饰器
decorators usage
-
deferred
-
factory-creator
Deprecated 迁移指南
将Class转换成factory,供directive语法使用
.directive('editor', FactoryCreator.create(Editor))
-
injector
在angular环境之外获取ng-app的注入器
import injector from 'angular-es-utils/injector';
let scope = injector.get('$rootScope').$new();
-
EventBus
事件总线,环境无关的 订阅/发布 模型
import EventBus from 'angular-es-utils/event-bus';
const deregister = EventBus.on('grid:click', (num1,num2,num3) => console.log(num1, num2, num3));
EventBus.dispatch('grid:click', 1, 2, 3);
deregister();
-
module-helper
import ModuleHelper from 'angular-es-utils/module-helper';
let module = ModuleHelper.get('app');